import request from '@/utils/request'

// 查询船速仪列表
export function listSpeed(query) {
    return request({
        url: '/training/shipSpeed/list',
        method: 'post',
        params: query
    })
}

// 查询船速仪详细
export function getSpeed(id) {
    return request({
        url: '/training/shipSpeed/getInfo?id=' + id,
        method: 'post'
    })
}

// 新增船速仪
export function addSpeed(data) {
    return request({
        url: '/training/shipSpeed/add',
        method: 'post',
        data: data
    })
}

// 修改船速仪
export function updateSpeed(data) {
    return request({
        url: '/training/shipSpeed/edit',
        method: 'post',
        data: data
    })
}

// 删除船速仪
export function delSpeed(id) {
    return request({
        url: '/training/shipSpeed/deleteById/' + id,
        method: 'delete'
    })
}

// 导出船速仪
export function exportSpeed(query) {
    return request({
        url: '/training/speed/export',
        method: 'get',
        params: query
    })
}